#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Kang.Cunhua
# @Date:   2015-11-08 16:08:05
# @Last Modified by:   Kang.Cunhua
# @Last Modified time: 2015-11-12 15:02:29
import threading
# 2015-10-25 15:58:17


class Th(threading.Thread):
    """docstring for Th"""

    def __init__(self, name):
        threading.Thread.__init__(self)
        self.t_name = name
        # 调用父类构造函数

    def run(self):
        # 重写run()函数，现成默认从此函数开始执行
        print 'this is ' + self.t_name
if __name__ == '__main__':
    thread1 = Th('thread1')
    thread1.start()
    # start()函数启动线程，自动执行run()函数
    thread2 = Th('thread2')
    thread2.start()
